/*****************************************************************************
 *   Copyright (C) 2008 John Schember <john@nachtimwald.com>                 *
 *                                                                           *
 *   This file is part of niwbillmanager.                                    *
 *                                                                           *
 *   niwbillmanager is free software: you can redistribute it and/or         *
 *   modify it under the terms of the GNU General Public License as          *
 *   published by the Free Software Foundation, either version 3 of the      *
 *   License, or (at your option) any later version.                         *
 *                                                                           *
 *   niwbillmanager is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
 *   GNU General Public License for more details.                            *
 *                                                                           *
 *   You should have received a copy of the GNU General Public License       *
 *   along with niwbillmanager. If not, see                                  *
 *   <http://www.gnu.org/licenses/>.                                         *
 *****************************************************************************/

#ifndef SETTINGSMANAGER_H
#define SETTINGSMANAGER_H

#include <QByteArray>
#include <QColor>
#include <QPoint>
#include <QSet>
#include <QSettings>
#include <QSize>

class SettingsManager : private QSettings
{
    public:
        SettingsManager();

        QPoint getMainWindowPosition();
        QSize getMainWindowSize();
        QByteArray getMainWindowState();
        bool isMainWindowToolbarVisible();
        Qt::ToolButtonStyle getMainWindowToolbarButtonStyle();
        QByteArray getMainWindowHSplitterState();
        QByteArray getMainWindowVSplitterState();
        QByteArray getMainWindowItemListHeaderState();
        QColor getMainWindowDuePastColor();
        QColor getMainWindowDueTodayColor();
        QColor getMainWindowDueWeekColor();
        QString getMainWindowCurrencySymbol();
        QString getBackendCurrent();
        QSet<QString> getPluginsEnabled();

        void setMainWindowPosition(QPoint position);
        void setMainWindowSize(QSize size);
        void setMainWindowState(QByteArray state);
        void setMainWindowToolbarVisible(bool isVisible);
        void setMainWindowToolbarButtonStyle(Qt::ToolButtonStyle style);
        void setMainWindowHSplitterState(QByteArray state);
        void setMainWindowVSplitterState(QByteArray state);
        void setMainWindowItemlistHeaderState(QByteArray state);
        void setMainWindowDuePastColor(QColor color);
        void setMainWindowDueTodayColor(QColor color);
        void setMainWindowDueWeekColor(QColor color);
        void setMainWindowCurrencySymbol(QString symbol);
        void setBackendCurrent(QString backendName);
        void setPluginsEnabled(QSet<QString> plugins);

    private:
        QColor m_duePastColor;
        QColor m_dueTodayColor;
        QColor m_dueWeekColor;
        QString m_currencySymbol;
};

#endif /* SETTINGSMANAGER_H */
